git option in config should be an enumeration
authorWesley Wiser <wwiser@gmail.com>
Mon, 5 Jan 2015 01:59:43 +0000 (20:59 -0500)
committerWesley Wiser <wwiser@gmail.com>
Tue, 6 Jan 2015 02:04:06 +0000 (21:04 -0500)
commit16d3e72a8fd71de9df1fab8ef8c791d5f7666ad0
tree4dc160d02c85a283149f1da394c9d7c76272aa92
parenta45aa4ad27884d2a113907623c71d90f3111296d
git option in config should be an enumeration

The option in ~/.cargo/config is now called `vcs` and has the following
options: "git", "hg", and "none". This corresponds to the options for
the --vcs argument to `cargo new`.

This also fixes detection for hg repositories. Previously, we only tried
to discover if the working directory was contained in a git repository.
If it was, we would skip creating a git repo. Now, we check if the
working directory is contained in either a git or mecurial repo. If it
is, we skip creating a new repo.

Fixes #1116
src/bin/new.rs
src/cargo/ops/cargo_new.rs
src/cargo/ops/mod.rs
src/cargo/util/vcs.rs
src/doc/config.md